#include <iostream>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
using namespace std;

void handler(int signo)
{
    cout << "get a signo...... signo: " << signo << endl;
}

int main()
{
    // signal(SIGINT,SIG_IGN);
    //signal(2, SIG_IGN);
    signal(2,handler);
    while (true)
    {
        cout << "i am a proces.... pid:" << getpid() << endl;
        sleep(1);
    }
    return 0;
    
}